package com.example.chapter12.design.factory.demo3;

import com.example.chapter12.design.factory.demo1.Fruit;

public class User {
    private void eat() {
        IFactory appleFactory = new AppleFactory();
        Fruit apple = appleFactory.create();
        IFactory pearFactory = new PearFactory();
        Fruit pear = pearFactory.create();
    }
}
